<div class="page-wrapper">
    <header class="page-heading clearfix">
        <h1 class="heading-title pull-left"><?php echo $message->title ?></h1>
        <div class="breadcrumbs pull-right">
            <ul class="breadcrumbs-list">
                <li class="breadcrumbs-label">You are here:</li>
                <li><a href="<?php echo base_url() ?>">Home</a><i class="fa fa-angle-right"></i></li>
                <li><a href="<?php echo base_url() ?>courses/mycourses">My Messages</a><i class="fa fa-angle-right"></i></li>
                <li class="current"><?php echo $message->title ?></li>
            </ul>
        </div><!--//breadcrumbs-->
    </header> 
    <div class="page-content">
        <div class="row page-row">
            <div class="course-wrapper col-md-8 col-sm-7">                         
                <article class="course-item">
                    <p class="meta text-muted"><?php echo lang('by') ?>: <a href="#"><?php echo $sender->username ?></a> | <?php echo lang('sent_at') ?>: <?php echo $message->time ?></p> 
                    <div class="page-row">
                        <?php echo $message->content; ?>
                    </div>
                </article><!--//course-item-->                                              
            </div><!--//course-wrapper-->
            <aside class="page-sidebar  col-md-3 col-md-offset-1 col-sm-4 col-sm-offset-1">     
                <section class="widget has-divider">
                    <h3 class="title"><?php echo lang('reply'); ?></h3>
                    <p>Απαντήστε στο μήνυμα του <?php echo $sender->username ?> με</p>
                    <p>
                        <!-- trigger modal -->
                        <button class="btn btn-primary" data-toggle="modal" data-target="#myModal">Προσωπικό μήνυμα</button>
                    </p>
                </section><!--//widget-->      
            </aside>
        </div><!--//page-row-->
    </div><!--//page-content-->
</div>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Προσωπικό Μήνυμα</h4>
      </div>
      <div class="modal-body">
          <form action="<?php echo base_url(); ?>messages/send" method="post">
                <input type="hidden" name="to_user" value="<?php echo $sender->id ?>"/>
                <div class="form-group">
                    <input type="text" name="message_title" class="form-control" placeholder="τίτλος"/>
                </div>
                <div class="form-group">
                    <textarea name="message_content" class="form-control" placeholder="μήνυμα"></textarea>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                    <input class="btn btn-primary" type="submit" value="Αποστολή">
                </div>
          </form>
      </div>
    </div>
  </div>
</div>